﻿/// Name - MyHealth/CancelQuestionaire.cs
/// Description - Displays text to indicate the questionaire has been cancelled
/// Programmer - Dan Yatzeck
/// Date coded - 11/6/2011
/// Arguments - None
/// Variables -
///     _presenter = Object linking to parent Presenter
/// Files accessed by this code artifact - None
/// Files changed by this code artifact - None
/// I/O -
///     Output - Web page
/// Error Handling - None
/// Modifications -
///     1.0 - Initial coding
/// Known Faults -
///     1.0 - None known

using System;
using Microsoft.Practices.ObjectBuilder;

namespace CSC440TeamOne.MyHealth.Views
{
    /// <summary>
    /// Indicates the questionaire has been cancelled
    /// </summary>
	public partial class CancelQuestionaire : Microsoft.Practices.CompositeWeb.Web.UI.Page, ICancelQuestionaireView
	{
		private CancelQuestionairePresenter _presenter;

        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
		protected void Page_Load(object sender, EventArgs e)
		{
			if (!this.IsPostBack)
			{
				this._presenter.OnViewInitialized();
			}
			this._presenter.OnViewLoaded();
		}

        /// <summary>
        /// When this object is instantiated, create the presenter link
        /// </summary>
		[CreateNew]
		public CancelQuestionairePresenter Presenter
		{
			get
			{
				return this._presenter;
			}
			set
			{
				if(value == null)
					throw new ArgumentNullException("value");

				this._presenter = value;
				this._presenter.View = this;
			}
		}

		// TODO: Forward events to the presenter and show state to the user.
		// For examples of this, see the View-Presenter (with Application Controller) QuickStart:
		//	

	}
}

